﻿using Terraria;
using Terraria.ID;
using Terraria.ModLoader;

namespace HardcoreGame.Content.Buffs
{
    public class FlowerVineEnemyBuff : ModBuff
    {
        public static readonly int TagDamage = 6;

        public override void SetStaticDefaults()
        {
            BuffID.Sets.IsATagBuff[Type] = true;
        }
    }
    public class WhipDebuffNPC : GlobalNPC
    {
        public override void ModifyHitByProjectile(NPC npc, Projectile projectile, ref NPC.HitModifiers modifiers)
        {
            if (!projectile.npcProj && !projectile.trap && projectile.IsMinionOrSentryRelated)
            {
                var projTagMultiplier = ProjectileID.Sets.SummonTagDamageMultiplier[projectile.type];
                if (npc.HasBuff<FlowerVineEnemyBuff>())
                {
                    modifiers.FlatBonusDamage += FlowerVineEnemyBuff.TagDamage * projTagMultiplier;
                }
            }
        }
    }
}
